package com.liwei.lwmail.cart.service;

import com.liwei.lwmail.cart.vo.Cart;
import com.liwei.lwmail.cart.vo.CartItem;
import org.springframework.data.redis.core.BoundHashOperations;

import java.util.List;
import java.util.concurrent.ExecutionException;

public interface CartService {
    CartItem add(Long skuId, Integer num) throws ExecutionException, InterruptedException;

    CartItem getCartItemBySkuId(Long skuId);

    Cart getCart() throws ExecutionException, InterruptedException;

    void clearCart(String cartKey);

    void updateItemChecked(Long skuId, Integer check);

    void updateItemNum(Long skuId, Integer num);

    void deleteItem(Long skuId);

    List<CartItem> getUserCartItems();
}
